/**
 * Copyright (c) 2020, Mr.Wang (recallcode@aliyun.com) All rights reserved.
 */

package com.cpipec.demo.vo;

import java.util.List;

public class PageResultVO<T> {

	private int code; // 状态码, 0表示成功

	private String msg;  // 提示信息

	private long count; // 总数量, bootstrapTable是total

	private List<T> data; // 当前数据, bootstrapTable是rows

	public PageResultVO() {
	}

	public PageResultVO(List<T> rows) {
		this(rows, rows.size());
	}

	public PageResultVO(List<T> rows, long total) {
		this.count = total;
		this.data = rows;
		this.code = 0;
		this.msg = "";
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public List<T> getData() {
		return data;
	}

	public void setData(List<T> data) {
		this.data = data;
	}

}
